//
//  DBPopoverController.swift
//  大波微博swift
//
//  Created by 大波 on 16/3/2.
//  Copyright © 2016年 zhaojin. All rights reserved.
//

import UIKit


class DBPopoverController: UITableViewController {
    
    private let reuseIdentifier = "reuseIdentifier"

    let data = ["首页", "好友圈", "群微博", "我的微博", "新浪微博"]
    
    override func viewDidLoad() {
        
        super.viewDidLoad()
        
        tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: reuseIdentifier)
    }
}

// MARK: - Table view data source

extension DBPopoverController {
    
    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        
        return 1
    }
    
    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        
        return data.count
    }
    
    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        
        let cell = tableView.dequeueReusableCellWithIdentifier("reuseIdentifier", forIndexPath: indexPath)
        
        cell.textLabel?.text = data[indexPath.row]
        
        return cell
    }
}